package com.ews.onlineexchange.service.observer;

import javax.ejb.Asynchronous;
import javax.ejb.Stateless;
import javax.enterprise.event.Observes;
import javax.inject.Inject;

import com.ews.onlineexchange.model.Bulletin;
import com.ews.onlineexchange.service.qualifier.SendWsEvent;
import com.ews.onlineexchange.service.test.BulletinEndClientEndPointService;

@Stateless
public class SendWsObserver {
	
	@Inject
	BulletinEndClientEndPointService bulletinEndClientEndPointService;
	
	@Asynchronous
	public void send(@Observes @SendWsEvent Bulletin bulletin) {
//		try {
//			bulletinEndClientEndPointService.sendMessage(bulletin);
//		} catch (DeploymentException e) {
//			e.printStackTrace();
//		} catch (IOException e) {
//			e.printStackTrace();
//		} catch (URISyntaxException e) {
//			e.printStackTrace();
//		} 	
	}
}
